package com.ithiem.dubbo.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.model.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    @Select("select * from tb_user")
    List<User> findAll();

    @Select("select Count(*) from tb_user")
    Integer findAllCounts();
    //查询指定存活天数的用户数量
    @Select("select Count(*) from tb_user where active_days>=#{days}")
    Integer findActiveDaysCounts(@Param("days") Integer days);
}
